package snmpstatistics;

import java.util.TimerTask;

import features.SNMPSession;

public class RetrieveStats extends TimerTask {
//	private final static long SLEEP_TIME = 1000;

	private SNMPSession session = null;

	private StatsPanel panel = null;

	public RetrieveStats(SNMPSession session, StatsPanel panel) {
		this.session = session;
		this.panel = panel;
	}

	@Override
	public void run() {
		try {
			SNMPStats stats = null;
			
			stats = SNMPStats.fromSession(session);

			panel.updateStats(stats);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
